package com.longma.server.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.longma.server.constant.enums.GeneralStateEnum;
import com.longma.server.constant.enums.UserTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author HAIBO
 * @since 2021-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysUser对象", description="")
public class SysUser implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("login_name")
    private String loginName;

    @TableField("real_name")
    private String realName;

    private String password;

    private Integer gender;

    private Integer age;

    private String photo;

    private String phone;

    private String email;

    private String wechat;

    @ApiModelProperty(value = "用户类型：0超级管理；1普通用户")
    private UserTypeEnum type;

    private GeneralStateEnum state;

    @TableField(fill= FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill= FieldFill.UPDATE)
    private LocalDateTime updateTime;


}
